import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { INestApplication } from '@nestjs/common';
import { HttpExceptionFilter } from './HttpExceptionFilter';
import * as cookieParser from 'cookie-parser'
import "reflect-metadata";

async function bootstrap() {
  const app: INestApplication = await NestFactory.create(AppModule);
  app.use(cookieParser());
  app.useGlobalFilters(new HttpExceptionFilter());
  // app.useGlobalPipes(new ValidationPipe()); 全局使用ValidationPipe
  await app.listen(3000);
}
bootstrap();
